#include "mystdio.h"
#include <stdio.h>
#include <string.h>
#include <unistd.h>

int main()
{
    _FILE* fp = _fopen("test.txt", "w");
    if(fp == NULL)  return 1;

    const char* msg = "hello Linux";
    const char* message = "hello systemcall\n";
    int cnt = 10;
    while(cnt)
    {
        cnt--;
        //_fwrite(fp, msg, strlen(msg));
        _fwrite(fp, message, strlen(message));
        sleep(1);
    }

    _fclose(fp);
    return 0;
}
